package cn.wolfcode.car.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class SystemDictionaryItem {
    private Long id;

    private String title;

    private Integer sequence;

    private Long typeId;

    private Long parentId;
    //数据在联表中获取
    private String parentTitle;

    public Object getJson(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", this.id);
        map.put("title", this.title);
        map.put("sequence", this.sequence);
        map.put("typeId", this.typeId);
        map.put("parentId", this.parentId);
        return JSON.toJSONString(map);
    }

}